<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        // function myFunction(x, y, z) {
        //     return x+y+z;
        // }
        // var args = [0, 1, 2];
        // console.log(myFunction.apply(null, args));;
        // console.log(...args);


        // var arr = [1, 2, 3,{name:'张三'}];
        // var arr2 = [...arr]; // like arr.slice()
        // arr2[2] = 10;
        // arr2[3].name = '李四';
        // console.log(arr);
        // console.log(arr2);

        // arr2 此时变成 [1, 2, 3, 4]
        // arr 不受影响

    </script>
</body>

</html>